<template>
  <div class="member-home-panel">
    <div class="header">
      <h4>{{ title }}</h4>
      <XtxMore to="/"></XtxMore>
    </div>

    <!-- 商品列表 -->
    <div class="goods-item">
      <slot></slot>
    </div>
  </div>
</template>

<script>
import XtxMore from '@/components/library/XtxMore'

export default {
  name: 'MemberHomePanel',
  components: {
    XtxMore
  },
  props: {
    title: {
      type: String,
      default: '我的收藏'
    }
  }
}
</script>

<style lang="less" scoped>
.member-home-panel {
  height: 400px;
  margin-top: 20px;
  padding: 0 20px;
  background: #ffffff;

  .header {
    height: 66px;
    display: flex;
    justify-content: space-between;
    //align-items: center;
    // 使用下面两个属性来代替 align-items: center, 使得右边的`查看更多` 位置往下偏移一些
    padding: 18px 0;
    align-items: baseline;
    border-bottom: 1px solid #f5f5f5;

    h4 {
      font-size: 22px;
      font-weight: normal;
    }
  }

  .goods-item {
    display: flex;
    justify-content: space-around;
    padding-top: 20px;
  }
}
</style>
